<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCarCalendarsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('car_calendars', function (Blueprint $table) {
            $table->id();
            $table->integer('car_id')->default(0)->comment('车id');
            $table->string('day')->nullable()->comment('日期如：20220211');
            $table->string('week')->nullable()->comment('星期');
            $table->decimal('day_price',10,2)->default(0.00)->comment('当日价格');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('car_calendars');
    }
}
